package com.woniu.car.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class AddGoodsParam {


    /**
     * 商品名
     */
    @ApiModelProperty(value = "商品名",required = true)
    @NotEmpty(message="商品名不能为空")
    private String goodsName;

    /**
     * 商品分类id
     */
    @ApiModelProperty(value = "商品分类id",example = "1",required = true)
    @NotNull(message="商品id不能为空")
    @Min(0)
    private Integer categoryId;

    /**
     * 商品介绍
     */
    @ApiModelProperty(value = "商品介绍",required = true)
    @NotNull(message = "商品介绍不能为空")
    private String description;

    /**
     * 商品基础价格
     */
    @ApiModelProperty(value = "商品价格",example = "0.00",required = true)
    @NotNull(message = "价格不能为空")
    @Min(value = 0, message = "价格设置有误")
    private Double goodsPrice;


    /**
     * 能否使用优惠券，0.不可以，1.可以
     */
//    @ApiModelProperty(value = "优惠券限制,0.可用,1.不可用",example = "0",required = true)
//    @NotNull(message = "优惠券限制不能为空,")
//    @Max(value = 1,message = "优惠券限制只能是0或1")
//    @Min(value = 0,message = "优惠券限制只能是0或1")
//    private Integer isCoupon;




}
